﻿using BCEntity.TMS.Agent.AgnetVehicleType;
using BCEntity.TMS.VehicleType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Agent.AgnetVehicleType
{
    /// <summary>
    /// 代理商车型记录
    /// </summary>
    public interface IAgentVehicleTypeData
    {
        /// <summary>
        /// 获取代理商车型记录
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="categoryReferenceIdStr">车辆分类对应Id</param>
        /// <param name="vehicleTypeId">车辆类型Id</param>
        /// <param name="vehicleTypeEnum">车辆所属类型（对应字典引用检索键）</param>
        /// <param name="maxStartWeight">最大开始载重</param>
        /// <param name="maxEndWeight">最大结束载重</param>
        /// <param name="maxStartStere">车辆最大起始载货立方</param>
        /// <param name="maxEndStere">车辆最大结束载货立方</param>
        /// <param name="enabled">是否启用</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">页面大小</param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleTypeExpandEntity>, int)> GetAsync(long? agentRecordId, string categoryReferenceIdStr, int? vehicleTypeId, string vehicleTypeEnum, int? maxStartWeight, int? maxEndWeight, decimal? maxStartStere, decimal? maxEndStere, bool? enabled, int pageIndex, int pageSize);

        /// <summary>
        /// 获取代理商车型记录
        /// </summary>
        /// <param name="agentRecordId">代理商ID</param>
        /// <param name="vehicleTypeId">车型ID</param>
        /// <returns></returns>
        Task<AgentVehicleTypeEntity> GetById(long? agentRecordId, int vehicleTypeId);

        /// <summary>
        /// 更新代理商车型记录
        /// </summary>
        /// <param name="entity">代理商车型记录</param>
        /// <returns></returns>
        Task<AgentVehicleTypeEntity> UpdateAsync(AgentVehicleTypeEntity entity);

        /// <summary>
        /// 添加代理商车型记录
        /// </summary>
        /// <param name="entity">代理商车型记录</param>
        /// <returns></returns>
        Task<AgentVehicleTypeEntity> InsertAsync(AgentVehicleTypeEntity entity);

        /// <summary>
        /// 更新代理商车型启用状态
        /// </summary>
        /// <param name="vehicleTypeId">车型ID</param>
        /// <returns></returns>
        Task<int> UpdateEnabledByVehicleTypeId(int vehicleTypeId);
    }
}
